from operator import index

nn = int(input())
a = list(map(int, input().split()))
n = len(a)
#first loop the item to be insert
for i in range(1, n):
    value_to_insert = a[i]
    index_to_inesrt = i
    for j in range(i-1, -1, -1):
        if a[j] > value_to_insert:
            a[j+1] = a[j]
            if j == 0:
                index_to_inesrt = 0
        else:
            index_to_inesrt = j + 1
            break
        # print(a)
    a[index_to_inesrt] = value_to_insert



print(*a)



